package mytest.recursion;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

/**
 * Created by thinkpad on 2015/5/23.
 */
public class Test1 {
    public static  void main (String[] args) {
        String[] array = new String[]{"1","2"};
        System.out.println(gName());
        System.out.println(gB());
        listAll(Arrays.asList(array),"");
    }

    private static String gName() {
        String a = "1235556";
        return a;
    }

    private static int gB() {
        int b = 2;
        return b;
    }
    private static void listAll(List<String> candidate, String prefix) {
        System.out.println(prefix);
        for (int i = 0; i < candidate.size();i++) {
            List temp = new LinkedList(candidate);
            System.out.println("temp:"+temp);
            listAll(temp, prefix + temp.remove(i));
        }
    }
}
